package javase.ch03.pool.common;

import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;

public class newFixedThreadPoolDemo {
    public static void main(String[] args) {
        ExecutorService pool = Executors.newFixedThreadPool(3);

        pool.execute(new MyRunnable()); // pool-1-thread-1
        pool.execute(new MyRunnable()); //pool-1-thread-1
        pool.execute(new MyRunnable()); //pool-1-thread-1
        pool.execute(new MyRunnable());  //pool-1-thread-1
        pool.execute(new MyRunnable());//pool-1-thread-1

        pool.shutdown();
    }
}
